<script lang='ts' setup name='MyInput'>  
 import { ref } from 'vue'
 
const model = defineModel()



console.log(model)

function change(value?:any){
    model.value = value
}

</script>  
  
<template>  
  
<!-- 自定义的文本框 -->

<input type="text"  :value="model"    @input="change($event.target.value)" />

{{ model }}



</template>  
  
<style scoped>  

</style>  